package rezetkaTest;

import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import rezetkaPages.CartWindow;
import rezetkaPages.HomePage;
import rezetkaPages.ResultPage;

/**
 * Created by IIGalytska on 11.04.14.
 */
public class RezetkaOrderZeroGoodsNegative extends PrePostConditions{
    @Parameters("homeUrl")
    @BeforeMethod
    public void initState(String homeUrl)
    {
        driver.get(homeUrl);
        driver.manage().deleteAllCookies();
    }




    @Test
    @Parameters({"searchItem","zeroNumberOfGoods"})

    public void testOrder(String searchItem,String zeroNumberOfGoods){

        //start from home page
        HomePage home = new HomePage(driver);
        //navigate to product search result page
        ResultPage result = home.search(searchItem);
        //press bey! button for the first link
        CartWindow cart = result.pressBuyForFirstLink();
        //press checkout button


        //Assert.assertFalse(cart.selectZeroGoods(param1));


        Assert.assertTrue(cart.selectInvalidNumberOfGoods(zeroNumberOfGoods).contains("background-color: rgb(255"));
    }





















}
